package org.jeecg.modules.exBond.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.exBond.entity.ExBondPaysituation;
import org.jeecg.modules.exBond.mapper.ExBondPaysituationMapper;
import org.jeecg.modules.exBond.service.IExBondPaysituationService;
import org.jeecg.modules.exTender.entity.ExTenderList;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 保证金缴纳情况
 * @Author: jeecg-boot
 * @Date:   2024-10-18
 * @Version: V1.0
 */
@Service
public class ExBondPaysituationServiceImpl extends ServiceImpl<ExBondPaysituationMapper, ExBondPaysituation> implements IExBondPaysituationService {

    @Override
    public ExBondPaysituation getByExSectionId(String exSectionId) {
        LambdaQueryWrapper<ExBondPaysituation> query = new LambdaQueryWrapper<ExBondPaysituation>().eq(ExBondPaysituation::getBidSectionId, exSectionId);
        List<ExBondPaysituation> list = this.list(query);
        if(CollectionUtil.isEmpty(list)){
            return null;
        }
        return  list.get(0);
    }
}
